
program pascal_triangle;

{$APPTYPE CONSOLE}



uses
  SysUtils;

type
  arrInteger=array of integer;

var
  n, i, j: integer;
  a: array of arrInteger;


begin
  readln(n);
  writeln;
  setlength(a, n);
  for i:=0 to n-1 do
    setlength(a[i], i+1);
  for i:=0 to n-1 do
    a[i][0]:=1;
  for i:=1 to n-1 do
    a[i][i]:=1;
  for i:=2 to n-1 do
  begin
    for j:=1 to i-1 do
      a[i][j]:=a[i-1][j-1]+a[i-1][j];
  end;
  for i:=0 to n-1 do
  begin
    for j:=0 to i do
      write(a[i][j],' ');
    writeln;
  end;
  readln;
end.
 